﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Deeper.DataAccess;
using Deeper.Common;
namespace ZhongTian.Model
{
	public partial class Items
	{

		public Lazy<string> ClassName { set; get; }
		public Items()
		{
			ClassName = new Lazy<string>(() =>
				{
					string str = "无类别";
					if (ClassId > 0)
					{
						ItemClass cls = new DataContext().GetEntityById<ItemClass>(ClassId);
						str = cls.IsNull() ? "已删除类别" : cls.ItemClassName;
					}
					return str;
				});
		}
	}
}
